package com.zzw.thread;

public class A {

	public synchronized void foo(B b){
		System.out.println("" + Thread.currentThread().getName()
				+ "");
		try {
			Thread.sleep(200);
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
		System.out.println(":" + Thread.currentThread().getName()
				+ "");
		b.last();
	}
	
	public synchronized void last(){
		System.out.println("");
	}
}